package com.wj.auth.exception.message;

import io.micrometer.core.instrument.util.StringUtils;

public class ServiceMessage extends ApplicationMessage {
    protected ServiceMessage(int code, String message, MessageType type) {
        super(code, message, type);
    }

    public static ServiceMessage duplicateValue(String message) {
        return new ServiceMessage(10201, StringUtils.isEmpty(message) ? " Duplicate value " : message, MessageType.SERVICE);
    }
}